home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / dos / fputs.c < prev    next >
C/C++ Source or Header  |  1996-10-24  |  2KB  |  75 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: fputs.c,v 1.4 1996/10/24 15:50:30 aros Exp $
  4.     $Log: fputs.c,v $
  5.     Revision 1.4  1996/10/24 15:50:30  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.3  1996/08/13 13:52:46  digulla
  9.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  10.     Replaced AROS_LA by AROS_LHA
  11.  
  12.     Revision 1.2  1996/08/01 17:40:51  digulla
  13.     Added standard header for all files
  14.  
  15.     Desc:
  16.     Lang: english
  17. */
  18. #include <clib/exec_protos.h>
  19. #include <dos/dosextens.h>
  20. #include "dos_intern.h"
  21.  
  22. /*****************************************************************************
  23.  
  24.     NAME */
  25.     #include <clib/dos_protos.h>
  26.  
  27.     AROS_LH2(LONG, FPuts,
  28.  
  29. /*  SYNOPSIS */
  30.     AROS_LHA(BPTR,   file,   D1),
  31.     AROS_LHA(STRPTR, string, D2),
  32.  
  33. /*  LOCATION */
  34.  
  35.     struct DosLibrary *, DOSBase, 56, Dos)
  36.  
  37. /*  FUNCTION
  38.  
  39.     INPUTS
  40.     file   - Filehandle to write to.
  41.     string - String to write.
  42.  
  43.     RESULT
  44.     0 if all went well or EOF in case of an error.
  45.     IoErr() gives additional information in that case.
  46.  
  47.     NOTES
  48.  
  49.     EXAMPLE
  50.  
  51.     BUGS
  52.  
  53.     SEE ALSO
  54.     FGetC(), IoErr()
  55.  
  56.     INTERNALS
  57.  
  58.     HISTORY
  59.     29-10-95    digulla automatically created from
  60.                 dos_lib.fd and clib/dos_protos.h
  61.  
  62. *****************************************************************************/
  63. {
  64.     AROS_LIBFUNC_INIT
  65.     AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
  66.     
  67.     while(*string)
  68.         if(FPutC(file,*string++)<0)
  69.             return EOF;
  70.             
  71.     return 0;
  72.     
  73.     AROS_LIBFUNC_EXIT
  74. } /* FPuts */
  75.